package com.wr.springbootsss.service;

import com.wr.springbootsss.pojo.Resume;
import com.wr.springbootsss.repository.ResumeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 王瑞
 * @description:
 * @date 2020/3/11  13:32
 */
@Service
public class ResumeService {

    @Autowired
    private ResumeRepository repository;

    public void sava(Resume resume){
        repository.save(resume);
    }


    public void deleteById(Integer id){
        repository.deleteById(id);
    }

    public List<Resume> selectAll(){
        List<Resume> all = repository.findAll();
        return all;

    }

}
